<script setup lang="ts">
const currentYear = new Date().getFullYear()
</script>

<template>
  <div class="global-footer">
    <div class="footer-content">
      <p class="copyright">
        代码生成器 by 弦歌一路高声唱
      </p>
      <p class="github-link">
        Gitee 项目地址：
        <a
          href="https://gitee.com/zxianger/ai-code"
          target="_blank"
          rel="noopener noreferrer"
        >
          https://gitee.com/zxianger/ai-code
        </a>
      </p>
    </div>
  </div>
</template>

<style scoped>
/* 统一动画变量 */
:root {
  --animation-duration-fast: 0.2s;
  --animation-duration-normal: 0.3s;
  --animation-duration-slow: 0.5s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --animation-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.global-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out;
}

.global-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
  transition: left 2s ease;
}

.global-footer:hover::before {
  left: 100%;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-content {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.copyright {
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.copyright:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.github-link {
  margin: 12px 0 0 0;
  color: #666;
  font-size: 14px;
  transition: all 0.3s ease;
}

.github-link:hover {
  transform: translateY(-1px);
}

.github-link a {
  color: #667eea;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(102, 126, 234, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.github-link a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
  transition: left 0.5s ease;
}

.github-link a:hover::before {
  left: 100%;
}

.github-link a:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: #667eea;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  color: #5a6fd8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .global-footer {
    padding: 20px 24px;
  }
}

@media (max-width: 768px) {
  .global-footer {
    padding: 16px 20px;
  }
  
  .copyright,
  .github-link {
    font-size: 12px;
  }
  
  .github-link a {
    padding: 3px 6px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .global-footer {
    padding: 12px 16px;
  }
  
  .footer-content {
    text-align: center;
  }
  
  .github-link {
    margin: 8px 0 0 0;
  }
}
</style>
